package com.lysj.admin.master.common.spring.jpa;


import com.lysj.admin.master.common.web.ParamUtil;
import lombok.Getter;

/**
 * @author Created by zk on 2019-12-07 13:37
 * @description
 */
@Getter
public class MyPredicate {
    private PredicateEnum predicateEnum;
    private Object val;
    private String property;

    public MyPredicate(PredicateEnum predicateEnum, Object val, String property) {
        if(ParamUtil.isBlank(property)){
            throw new RuntimeException("查询条件构造错误，请输入正确的参数名");
        }
        this.predicateEnum = predicateEnum;
        this.val = val;
        this.property = property;
    }
}
